package com.mingqi.enetconnected.primary.mytask.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mingqi.enetconnected.R;
import com.mingqi.enetconnected.util.timer.CountDownTimerUtils;

import java.util.List;

/**
 * Created by li on 2018/8/10.
 * WeChat 18571658038
 * author LiWei
 */

public class LootAssignmentAdapter extends BaseQuickAdapter<String,BaseViewHolder> {

    public LootAssignmentAdapter(@Nullable List<String> data) {
        super(R.layout.item_loot_assignment,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {

        helper.setText(R.id.tv_content,item);
        helper.addOnClickListener(R.id.tv_loot_assignment);

        // TODO: 2018/8/13 需判断是否开启
        TextView tvCountDown = helper.getView(R.id.tv_count_down);
        CountDownTimerUtils timer = new CountDownTimerUtils(tvCountDown, 5 *60 * 1000, 1000);
        timer.start();
    }
}
